import request from '@/utils/request'


//查询机构列表（上下级）
export function getOrganizationList(){
    return request({
        url:'/auth/organizationUnit/list',
        method:'get'
    })
}

//查询用户机构列表
export function getUserOrganizationList(data){
    return request({
        url:'/auth/organizationUnit/userlist',
        method:'post',
        data
    })
}
//保存机构信息
export function saveOrganizationInfo(data){
    return request({
        url:'/auth/organizationUnit/save',
        method:'post',
        data
    })
}
//查询机构信息
export function getOrganizationInfo(id){
    return request({
        url:'/auth/organizationUnit/info?id='+id,
        method:'get'
    })
}
//删除机构信息
export function deleteOrganizationInfo(id){
    return request({
        url:'/auth/organizationUnit/delete?id='+id,
        method:'delete'
    })
}
//获取机构用户
export function getOrganizationUsers(id){
    return request({
        url:'/auth/organizationUnit/users?id='+id,
        method:'get'
    })
}
//获取所有机构字典
export function getOrganizationDictionary(){
    return request({
        url:'/auth/organizationUnit/dictionary',
        method:'get'
    })
}
//保存机构用户
export function saveOrganizationUser(data){
    return request({
        url:'/auth/organizationUnit/saveUser',
        method:'post',
        data
    })
}